package com.bawei.yangzongcai___day2.MVPActivity;

import android.widget.ImageView;

import com.bawei.yangzongcai___day2.R;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * create by ertu
 * create on 2021/7/26
 * description
 */
public class BaseQuaireAdpter extends BaseQuickAdapter<JavaMVP.DataBean , BaseViewHolder> {

    public BaseQuaireAdpter( @Nullable List<JavaMVP.DataBean> data) {
        super(R.layout.mvpadpter, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, JavaMVP.DataBean dataBean) {
        baseViewHolder.setText(R.id.wen,dataBean.getTitle());
        Glide.with(getContext()).load(dataBean.getPic()).into((ImageView) baseViewHolder.getView(R.id.img));
    }
}
